package com.dycx.api.controller.app.food;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.dycx.common.RestResponse;
import com.dycx.food.service.GoodsClassFoodService;
import com.dycx.food.vo.GoodsClassVO;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@RestController
@RequestMapping(value = "/app/food/class")
@AllArgsConstructor
public class ClassFoodApiController {

    private GoodsClassFoodService goodsClassService;

    /**
     * 获取子分类
     **/
    @GetMapping("/getGoodsClassList")
    public RestResponse<?> getGoodsClassList(Integer parentId) {
        return RestResponse.success(goodsClassService.getAllList(parentId, true));
    }

}
